#include "legendlabel.h"

LegendLabel::LegendLabel(QWidget *parent) : QLabel(parent)
{

}



// 事件
bool LegendLabel::event(QEvent *event)
{
    switch(event->type())
    {
    case QEvent::MouseButtonPress:
        emit mouseClicked();
        return true;
        break;

    default:
        return QLabel::event(event);
        break;
    }
    return QLabel::event(event);
}


void LegendLabel::setIndex(int n)
{
    this->index = n;

    return;
}


int LegendLabel::getIndex()
{
    return index;
}

LegendLabel::~LegendLabel()
{

}
